<template>
  <slot></slot>
  <FuiToast ref="toastRef" />
</template>

<script setup lang="ts">
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
import { initToast } from "@/utils";
import { ref } from "vue";
import FuiToast from "./components/FirstUi/fui-toast/fui-toast.vue";

const toastRef = ref(null);
onLaunch(() => {
  console.log("App Launch");
});
onShow(() => {
  console.log('toastRef',toastRef);
  // 注入toast 从而随处调用
  initToast(toastRef.value);
});
onHide(() => {
  console.log("App Hide");
});
</script>
<style>
.wifth-full {
  width: 100%;
}

.transparent-bg {
  transition: opacity 0.3s ease;
  opacity: 0.5;
}
</style>
